how to find characteristics equation